include ../Makefile.shared

define PROJ_lbfgs
  SOURCES = lbfgs_impl.c lbfgs_stubs.c lbfgs.ml
  RESULT = lbfgs
endef
export PROJ_lbfgs

# If the environment does not define subprojects to handle,
# then set a default
ifndef SUBPROJS
  export SUBPROJS = lbfgs
endif

# Default target to use
all: ncl
	cp lbfgs.cmi lbfgs.cmxa liblbfgs_stubs.a lbfgs.a $(SRCLIBDIR)

# Catch-all target will be applied to all subprojects automatically
%:
	@$(MAKE) -f $(OCAMLMAKEFILE) subprojs SUBTARGET=$@
